import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Index from  '../views/Index.vue'
import Register from '../views/Register.vue'
import Nofind from '../views/404.vue'
import Login from '../views/Login.vue'
import Welcome from '../views/Welcome.vue'
import InfoShow from '../views/InfoShow.vue'
import FindList from '../views/FindList.vue'



Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
  //  name: 'Home',
    component: Index
  },
  {
    path: '/index',
    name: 'index',
    component:Index,
    children:[
      {
        path:'',component:Welcome
      },
      {
        path:'/welcome',
        name:'/welcome',
        component:Welcome
      },
      {
        path:'/findlist',name:'findlist',component:FindList
      },
      {
        path:'/infoshow',name:'infoshow',component:InfoShow
      }
    ]
    },
    {
      path:'/register',
      name:'register',
      component:Register
    },
    {
      path:'/login',
      name:'login',
      component:Login
    },
    
    {
      path:'*',
      name:'/404',
      component:Nofind
    }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
